var s1 = Symbol('foo');
var s2 = Symbol('bar');

s1 // Symbol(foo)
s2 // Symbol(bar)

var ret1 = s1.toString() // "Symbol(foo)"
var s11 = Symbol('foo');
ret11 = s11.toString();
if(s1 == s11)
{
    console.log("11");
}
ret = s2.toString() // "Symbol(bar)"


const shapeType = {
    triangle: Symbol()
  };
  
function getArea(shape, options) {
    var area = 0;
    switch (shape) {
        case shapeType.triangle:
        area = .5 * options.width * options.height;
        break;
    }
    return area;
}
  
  getArea(shapeType.triangle, { width: 100, height: 100 });

var obj = {};
var a = Symbol('a');
var b = Symbol('b');

obj[a] = 'Hello';
obj[b] = 'World';

var objectSymbols = Object.getOwnPropertySymbols(obj);


{
    var s1 = Symbol.for('foo');
    var s2 = Symbol.for('foo');

    s1 === s2 // true

    Symbol.for("bar") === Symbol.for("bar")
    // true

    Symbol("bar") === Symbol("bar")
    // false
}

{
    var s1 = Symbol.for("foo");
    Symbol.keyFor(s1) // "foo"

    var s2 = Symbol("foo");
    Symbol.keyFor(s2) // undefined
}


const COLOR_RED    = Symbol();
const COLOR_GREEN  = Symbol();

function getComplement(color) {
  switch (color) {
    case COLOR_RED:
      return COLOR_GREEN;
    case COLOR_GREEN:
      return COLOR_RED;
    default:
      throw new Error('Undefined color');
    }
}

log.levels = {
    DEBUG: Symbol('debug'),
    INFO: Symbol('info'),
    WARN: Symbol('warn')
  };
  log(log.levels.DEBUG, 'debug message');
  log(log.levels.INFO, 'info message');